POV-Ray : Newsgroups : povray.newusers : Cube in different colors ? : Re: Cube in different colors ? Server Time
4 Sep 2024 18:12:49 EDT (-0400)
  Re: Cube in different colors ?  
From: Warp
Date: 10 Sep 2002 12:44:36
Message: <3d7e2173@news.povray.org>
gam### [at] gmxnet <gam### [at] gmxnet> wrote:
> Hi! I am new with povray and wanted to render a box where the 6 sides are in
> different colors. Is there a way to manipulate the box object, or do i have
> to draw the 6 sides as 6 single boxes (CSG). Maybe UVmapping ?

  UV-mapping could be a way to do it if you can come up with a pattern
of the form described in chapter 6.7.7.1. I can't think of an easy way
of doing this right now...
  You could do it with six boxes, but that's not the only option.
  Using the intersection of six planes gives you a true box (which is
also usable in CSG) but can be a bit slower. You should definitely
remember to bound this "box" with a true box of the same size
(see bounded_by docs).
  You can also use the polygon or triangle primitives (the latter could
be inside a mesh, taking a bit less memory, I think), and it would be
faster to render but not usable in CSG (even though with a mesh you
can use inside_vector).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.